The present invention relates to an image processing apparatus, and more particularly to an image forming apparatus which conducts color correction processing on inputted color image data and outputs the processed color image data.
Conventionally, an image processing apparatus is well known in which color documents and the like are read out by an image input section such as a scanner, and the image data read out by the scanner is reproduced, for example, by a display or a color printer.
However, an image output apparatus such as a display or color printer has its own specific color reproduction properties. Therefore, it is difficult to reproduce the colors of an inputted color image precisely using an input device such as a scanner.
For this reason, conventionally a method has been proposed in which color correction processing is conducted in accordance with the color reproducing properties of the image output apparatus. One such color correction method described disclosed in Japanese Unexamined Patent Publication No. 63-2669. According to this method, a three-dimensional color correction table of RGB is prepared corresponding to all combinations of three-color components of red (R), green (G) and blue (B). Contents of color correction are stored at all three-dimensional coordinate positions, and color correction is conducted referring to this table.
However, according to this color correction method, the capacity of the memory for the color correction table is large. Therefore, the above color correction method is not suitable for practical use. For example, when the gradation of an inputted original color image data is expressed with eight bits (256 gradations) for each color of R, G and B, the number of colors is 16,780,000 (=256.sup.3). Thus, it is necessary to provide a memory capacity of 48 megabytes for the color correction table to store the R, G and B data.
In order to reduce the memory capacity of the color correction table, proposals have been made in Japanese Unexamined Patent Publication Nos. 4-144481 and 4-185075. In one such apparatus, a color correction table is not provided for all combinations of R, G and B. When only the results of color correction are stored with respect to the grid points formed by dividing the three-dimensional color space of R, G and B at appropriate intervals, the capacity of the table memory is reduced. In the case of color data which is not precisely coincident with the grid points, reference is made to the color correction data of a plurality of adjacent grid points so that color interpolation processing can be performed.
For example, in Japanese Unexamined Patent Publication No. 4-185075 an example is described in which color correction processing is conducted on the original color image data expressed by L*, a* and b* using the CIE uniform color space colorimetric system, and at the same time a conversion of the colorimetric system is conducted from L*, a* and b* to CMYK. In this case, in order to convert the values of L*, a* and b* of the original color image into C, M, Y, K corresponding to the amounts of ink of cyan, magenta, yellow and black, compensation data of eight grid points adjacent to the original color image data is referenced, and a color interpolation calculation is performed with respect to the inputted original color image data.
For example, an expression of interpolating operation to find a Y component is expressed as follows: ##EQU1## (Detailed descriptions of the variables can be found in the cited reference.)
Eight values of Y(1, a, b), . . . , Y(1+1, a+1, 30 1) on the right side of the expression are values of yellow obtained as a result of reference to the color correction table with respect to eight grid points adjacent to the target data. The interpolating operation is conducted in such a manner that these values are multiplied by a weight which is in inverse proportion to a distance in the color space so as to find the mean.
Although it is possible to reduce the capacity of the color correction table according to the prior art described above, it is necessary to perform multiplication 24 times and also to perform addition seven times for conducting a compensating operation with respect to one color component. Therefore, the number of operations is greatly increased, so that the processing time is increased.
Especially when image data is subjected to gradation number conversion in accordance with the gradation number (number of possible gradations) of the image output apparatus in addition to the color correction processing described above, the color correction processing requires a very large number of operations compared with the gradation number conversion processing. Therefore, the processing time is greatly increased.
That is, in the case where a color printer or a display is used for an image output apparatus in which color image data can be outputted for each pixel and further the gradation number capable of being outputted is different from the original color image data, it is necessary to perform gradation number conversion processing by which the gradation number of the original color image data is reduced to the gradation number N capable of being outputted, that is, it is necessary to perform N-gradation processing. For example, in the case where a color printer is used for the image output apparatus, in which gradation control cannot be conducted for each dot, the gradation number capable of being outputted is N=2. In this case, binary-coded processing is required, by which the gradation number of each color component of the original color image data is reduced to two, which corresponds to ON/OFF printing of dots.
Various methods are employed for processing in which the gradation number is made to N. In order to obtain the best image quality, the error diffusion method and the minimum average error method in the same group are well known. The error diffusion method and the minimum average error method are characterized in that the resolution is high and it is possible to continuously reproduce the gradation.
According to the minimum average error method, the following pixel data is corrected by the weighted mean value of the quantization errors which have occurred in the adjacent pixels, the values of which have already been N-coded. On the other hand, according to the error diffusion method, the quantization error which has occurred when a certain pixel is N-coded is diffused to the adjacent pixels which have not yet been N-coded.
It can be considered that the minimum average error method and the error diffusion method are precisely equivalent except for the handling at the image end. An example of binary-coded processing by the error diffusion method is disclosed in Japanese Unexamined Patent Publication No. 1-284173, entitled "Image Processing Method and Apparatus Thereof". Examples of multi-coded processing in which the value of N is not less than two are disclosed in Japanese Unexamined Patent Publications Nos. 3-18177, 3-34767, 3-80767 and 3-147480.
The aforementioned gradation number conversion in which the error diffusion method is used is relatively complicated as compared with other methods of gradation number conversion, and the number of operations required for conversion processing is large.
However, the aforementioned color correction processing, for example, the color correction processing disclosed in Japanese Unexamined Patent Publication No. 4-18507 requires a much larger number of operations than the gradation number conversion processing in which the error diffusion method is used. Therefore, in the prior art in which gradation number processing is performed by the error diffusion method after the completion of color correction, it is necessary to consider the processing time required for both the color correction and the gradation number conversion. Accordingly, the processing time is greatly increased.